import { defHttp } from '@/utils/http/axios'

// 查询考核奖励配置列表
export function getAssessmentConfigPage(params) {
  return defHttp.get({ url: '/wages/assessment-config/page', params })
}

// 查询考核奖励配置详情
export function getAssessmentConfig(id: number) {
  return defHttp.get({ url: `/wages/assessment-config/get?id=${id}` })
}

// 新增考核奖励配置
export function createAssessmentConfig(data) {
  return defHttp.post({ url: '/wages/assessment-config/create', data })
}

// 修改考核奖励配置
export function updateAssessmentConfig(data) {
  return defHttp.put({ url: '/wages/assessment-config/update', data })
}

// 删除考核奖励配置
export function deleteAssessmentConfig(id: number) {
  return defHttp.delete({ url: `/wages/assessment-config/delete?id=${id}` })
}

// 导出考核奖励配置 Excel
export function exportAssessmentConfig(params) {
  return defHttp.download({ url: '/wages/assessment-config/export-excel', params }, '考核奖励配置.xls')
}